package org.microdream.easy.deploy.po;

import ice.server.comm.PoExtender;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Objects;

@Entity
@Table(name = "d_dictionary", schema = "easydeploy", catalog = "")
public class DDictionary  extends PoExtender implements Serializable {
    private static final long serialVersionUID = 1L;
    private int id;
    private String dicName;
    private String dicValue;
    private String dicType;
    private Integer dicPid;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Basic
    @Column(name = "dic_name")
    public String getDicName() {
        return dicName;
    }

    public void setDicName(String dicName) {
        this.dicName = dicName;
    }

    @Basic
    @Column(name = "dic_value")
    public String getDicValue() {
        return dicValue;
    }

    public void setDicValue(String dicValue) {
        this.dicValue = dicValue;
    }

    @Basic
    @Column(name = "dic_type")
    public String getDicType() {
        return dicType;
    }

    public void setDicType(String dicType) {
        this.dicType = dicType;
    }

    @Basic
    @Column(name = "dic_pid")
    public Integer getDicPid() {
        return dicPid;
    }

    public void setDicPid(Integer dicPid) {
        this.dicPid = dicPid;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        DDictionary that = (DDictionary) o;
        return id == that.id &&
                Objects.equals(dicName, that.dicName) &&
                Objects.equals(dicValue, that.dicValue) &&
                Objects.equals(dicType, that.dicType) &&
                Objects.equals(dicPid, that.dicPid);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, dicName, dicValue, dicType, dicPid);
    }
}
